package com.example.ms;

import cn.hutool.core.annotation.Alias;

import java.util.Map;

public class FunASREntity {



    /**
     *  参数介绍
     * ``mode`：`offline`，表示推理模式为一句话识别；`online`，表示推理模式为实时语音识别；`2pass`：表示为实时语音识别，并且说话句尾采用离线模型进行纠错。
     * `wav_name`：表示需要推理音频文件名
     * `wav_format`：表示音视频文件后缀名，只支持pcm音频流
     * `is_speaking`：表示断句尾点，例如，vad切割点，或者一条wav结束
     * `chunk_size`：表示流式模型latency配置，`[5,10,5]`，表示当前音频为600ms，并且回看300ms，又看300ms。
     * `audio_fs`：当输入音频为pcm数据是，需要加上音频采样率参数
     * `hotwords`：如果使用热词，需要向服务端发送热词数据（字符串），格式为 "{"阿里巴巴":20,"通义实验室":30}"
     * `itn`: 设置是否使用itn，默认True
     */
    @Alias("mode")
    private String mode;
    @Alias("wav_name")
    private String wavName;
    @Alias("is_speaking")
    private boolean isSpeaking;
    @Alias("wav_format")
    private String wavFormat;
    @Alias("chunk_size")
    private long[] chunkSize;
    @Alias("hotwords")
    private Map<String,Integer> hotwords;
    @Alias("itn")
    private boolean itn;
    @Alias("audio_fs")
    private String audioFs;


    public FunASREntity(String mode, String wavName, boolean isSpeaking, String wavFormat, long[] chunkSize, Map<String, Integer> hotwords, boolean itn, String audioFs) {
        this.mode = mode;
        this.wavName = wavName;
        this.isSpeaking = isSpeaking;
        this.wavFormat = wavFormat;
        this.chunkSize = chunkSize;
        this.hotwords = hotwords;
        this.itn = itn;
        this.audioFs = audioFs;
    }


    public String getAudioFs() {
        return audioFs;
    }

    public void setAudioFs(String audioFs) {
        this.audioFs = audioFs;
    }

    public String getMode() {
        return mode;
    }
    public void setMode(String mode) {
        this.mode = mode;
    }
    public String getWavName() {
        return wavName;
    }
    public void setWavName(String wavName) {
        this.wavName = wavName;
    }
    public boolean isSpeaking() {
        return isSpeaking;
    }
    public void setSpeaking(boolean speaking) {
        isSpeaking = speaking;
    }

    public String getWavFormat() {
        return wavFormat;
    }

    public void setWavFormat(String wavFormat) {
        this.wavFormat = wavFormat;
    }

    public long[] getChunkSize() {
        return chunkSize;
    }

    public void setChunkSize(long[] chunkSize) {
        this.chunkSize = chunkSize;
    }

    public Map<String, Integer> getHotwords() {
        return hotwords;
    }

    public void setHotwords(Map<String,Integer> hotwords) {
        this.hotwords = hotwords;
    }

    public boolean isItn() {
        return itn;
    }

    public void setItn(boolean itn) {
        this.itn = itn;
    }
}
